const { defineConfig } = require('@vue/cli-service')
const path = require("path");
module.exports = defineConfig({
    transpileDependencies: true,
    devServer: {
        host: 'localhost',
        port: 8881,
        open: true,
        proxy: {
            "/api": {
                target: 'https://x.dscmall.cn',
                // 允许跨域
                changeOrigin: true
            }
        }
    },
    pluginOptions: {
        "style-resources-loader": {
            preProcessor: "less",
            //引入全局less文件
            patterns: [path.resolve(__dirname, "./src/views/less/common.less")]
        }
    },
})